#!/usr/bin/python2.7



class Vector2:

    def __init__(self, x, y):
        self.x = x
        self.y = y
        
    def copy(self):
        return Vector2(self.x, self.y)

    def getX(self):
        return self.x

    def getY(self):
        return self.y

    def setX(self, x):
        self.x = x

    def setY(self, y):
        self.y = y

    def getValue(self):
        return (self.x, self.y)

    def __eq__(self, b):
        return self.x == b.x and self.y == b.y

    def __lt__(self, b):
        return self.x < b.x and self.y < b.y

    def __le__(self, b):
        return self.x <= b.x and self.y <= b.y

    def __ge__(self, b):
        return self.x >= b.x and self.y >= b.y

    def __gt__(self, b):
        return self.x > b.x and self.y > b.y 


    def __add__(self, b):
        return Vector2(self.x + b.x, self.y + b.y)

    def __sub__(self, b):
        return Vector2(self.x - b.x, self.y - b.y)

    def __str__(self):
        return "("+str(self.x)+","+str(self.y)+")"

class Rectangle:
    
    def __init__(self, point1, point2):
        if (point1.getX() < point2.getX()):
            min_x = point1.getX()
            max_x = point2.getX()
        else: 
            min_x = point2.getX()
            max_x = point1.getX()

        if (point1.getY() < point2.getY()):
            min_y = point1.getY()
            max_y = point2.getY()
        else: 
            min_y = point2.getY()
            max_y = point1.getY()

        self.pointA = Vector2(min_x, min_y)
        self.pointB = Vector2(max_x, max_y)
        

        
    def getPointA(self):
        return self.pointA
    
    def getPointB(self):
        return self.pointB